﻿package mortal.game.view.signUp.sevenDayLogin.panel
{
    import flash.events.*;
    import mortal.game.events.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.game.view.rebate.openServerSevenDay.data.*;
    import mortal.mvc.core.*;

    public class SevenDayLoginIcon extends ActionBaseIcon
    {
        private static var _instance:SevenDayLoginIcon;

        public function SevenDayLoginIcon()
        {
            super(ResFileConst.SevenDayLoginIcon);
            this.name = "SevenDayLoginIcon";
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.name = "SevenDayLoginIcon";
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this.name = "";
            return;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.SevenDayLoginOpneModule));
            return;
        }// end function

        override public function show(param1:int = 0, param2:int = 0) : void
        {
            if (OpenServerSevenDayUtil.isNotOpenSpeActive())
            {
                return;
            }
            super.show(param1, param2);
            return;
        }// end function

        public static function get instance() : SevenDayLoginIcon
        {
            if (!_instance)
            {
                _instance = new SevenDayLoginIcon;
            }
            return _instance;
        }// end function

        public static function hasInstance() : Boolean
        {
            return _instance != null;
        }// end function

    }
}
